Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang format script added to auto-format C++ code; fixes #293 #294

Closed
wants to merge 1 commit into from

Conversation

rockett-m
Copy link
Contributor

@rockett-m rockett-m commented Jul 26, 2024

PR described in #293
[WIP]
This will lead to far less clang style errors vs before (so faster CI/CD lint stage) and prettier code.

We could consider splitting the lint github workflow stage into just style checks (newline/whitespace/format) separate from the clang tidy check which is more intensive and about C++ 20 features. Open to discussion.

The script is minimal, and I added it as a bare-bones version, but if we like this, I can optimize it to be more robust.

Edit: clang18 was the linked version in mac/homebrew so I had to override that.

brew uninstall --ignore-dependencies llvm
brew [re]install llvm@14

~/.zshrc
export PATH="/usr/local/opt/llvm@14/bin:$PATH"
LDFLAGS="-L/opt/homebrew/opt/llvm@14/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm@14/lib/c++"
export LDFLAGS="-L/opt/homebrew/opt/llvm@14/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm@14/include"

Signed-off-by: Morgan Rockett <morgan.rockett@tufts.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant